wx.cloud.init();

var favoriteStorage = {
  works: wx.cloud.database().collection("works"),

  readData: function(callback) {
    this.works.where({}).get({
      success: function (result) {
        callback(result.data);
      }
    });
  }
};

module.exports = favoriteStorage;